package cn.edu.zut.internship.mapper.sys;

import cn.edu.zut.internship.bean.sys.SysUser;
import cn.edu.zut.internship.entity.AuthSysUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface AuthSysUserMapper {
    List<Map> selectAll(Map params);
    int selectAllTotal(Map params);
    void unassignRoles(Long userId);

    /**
     * 新增用户角色关联信息
     * @param userId
     * @param roleId
     */
    void assignRole(@Param("userId") Long userId,@Param("roleId") Long roleId);
    AuthSysUser selectByUserName(String username);
    SysUser getSysUserInfo (String username);
    List<Map> selectRoleListByUserId(Long UserId);
}
